﻿using Microsoft.CodeAnalysis;
using TestBasic;
using Xunit.Abstractions;

namespace SourceGeneratorTest;

public class SourceGeneratorTestBase : TestBase
{
    public SourceGeneratorTestBase(ITestOutputHelper helper) : base(helper)
    {
    }


    public void PrintResult(IEnumerable<GeneratorRunResult> result)
    {
        foreach (var res in result)
        {
            foreach (var gen in res.GeneratedSources)
            {
                Output.WriteLine(gen.HintName);
                Output.WriteLine(gen.SourceText.ToString());
            }
        }
    }

}
